package com.chinabank.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="t_account")
public class Account implements Serializable{
	
	private Long id;
	private String username;
	private String password;
	private String description;
	private String email;
	private Group myGroup;
	
	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	@ManyToOne
	public Group getMyGroup() {
		return myGroup;
	}
	public void setMyGroup(Group myGroup) {
		this.myGroup = myGroup;
	}
	
	
	
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public Account() {}
	public Account(String username, String password, String description,
			String email, Group myGroup) {
		super();
		this.username = username;
		this.password = password;
		this.description = description;
		this.email = email;
		this.myGroup = myGroup;
	}
		
}
